<html>
<head>
    <link href="../css/dialog.css" rel="stylesheet">
    <link href="../css/uploadifive.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
    <script src="https://cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.js"></script>
    <script src="https://cdn.bootcss.com/font-awesome/5.10.0-12/js/all.min.js"></script>
    <script type='text/javascript' src='../js/dialog_function.js'></script>
    <script type='text/javascript' src='../js/jquery.uploadifive.js'></script>
    <?php
    include "../class/suggest_needshow.php";
    include '../db/sql.php';
    include '../functions.php';

    ?>
</head>
<body>
<?php
$new_suggest = new \suggest_content\suggest_needshow();
$sn = $_GET["sn"];
$new_suggest->from_sql($db,$sn);
$sug_array = $new_suggest->suggest_array;
$id = $row['AddUserId'];
$sug_array["refuseName"] = FindName($db,$id);
$new_suggest->make_suggest($sug_array);
$state = $_GET['state'];
if (strcmp($state, '建议实施通过') != 0) {
    echo '<script>close_dialog();</script>';
}
?>
<div class='dialog_form'>
    <div class="title_border">
        <div class='form_title'>确认实施</div>
        <a onclick="close_dialog()"><i class="fas fa-times"></i></a>
    </div>
    <div class="dailog_content_border">
        <table>
            <tr>
                <td class="row_name">SN</td>
                <td class="row_content"><input id='SN' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['SN'] ?>'></td>
                <td class="row_name">提议日期</td>
                <td class="row_content"><input id='AddTime' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['AddTime'] ?>'></td>
            </tr>
            <tr>
                <td class="row_name">员工工号</td>
                <td class="row_content"><input id='Account' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['AddUserId'] ?>'></td>
                <td class="row_name">员工姓名</td>
                <td class="row_content"><input id='AddName' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['AddUserName'] ?>'></td>
            </tr>
            <tr>
                <td class="row_name">添加人电话</td>
                <td class="row_content"><input id='AddPhone' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['AddUserMobile'] ?>'></td>
                <td class="row_name">当前状态</td>
                <td class="row_content"><input id='State' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['State'] ?>'></td>
            </tr>
            <tr>
                <td class="row_name">所属部门</td>
                <td class="row_content"><input id='AddUserDept' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['AddUserDept'] ?>'></td>
                <td class="row_name">提议名称</td>
                <td class="row_content"><input id='S_Title' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['S_Title'] ?>'></td>
            </tr>
            <tr>
                <td class="row_name">提议类型</td>
                <td class="row_content"><input id="S_Type" class="form_input" readonly='readonly' value='<?php echo $new_suggest->suggest_array['S_Type'] ?>'></td>
                <td class="row_name">重要等级</td>
                <td class="row_content"><input id='Suggest_importantLevel' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['ImportantLevel'] ?>'></td>
            </tr>
            <tr>
                <td class="row_name">建议实施部门</td>
                <td class="row_content"><input id="SuggestDept" class="form_input" readonly='readonly' value='<?php echo $new_suggest->suggest_array['SuggestDept'] ?>'></td>
                <td class="row_name">建议实施人</td>
                <td class="row_content"><input id="SuggestImpl" class="form_input" readonly='readonly' value='<?php echo $new_suggest->suggest_array['SuggestImpl'] ?>'></td>
            </tr>
                <tr>
                    <td class="row_name">
                        备注
                    </td>
                    <td class="row_content">
                        <input id="Notice" readonly="readonly" value="<?php echo $new_suggest->suggest_array['Notice'] ?>">
                    </td>
                </tr>
                <tr>
                    <td class="row_name">
                        计划关闭时间
                    </td>
                    <td class="row_content">
                        <input id="ForecastTime" readonly="readonly" value="<?php echo $new_suggest->suggest_array['ForecastTime'] ?>">
                    </td>
                    <td class="row_name">
                        分数
                    </td>
                    <td class="row_content">
                        <input id="Score" readonly="readonly" value="<?php echo $new_suggest->suggest_array['Score'] ?>">
                    </td>
                </tr>
            <tr>
                <td class="row_name">
                    现状描述
                </td>
                <td colspan="3" class="row_content">
                    <textarea id="CurrentDesc" name="CurrentDesc" rows="3" class='form_input' readonly='readonly'><?php echo $new_suggest->suggest_array['CurrentDesc'] ?></textarea>
                </td>
            </tr>
            <tr>
                <td class="row_name">
                    改进措施
                </td>
                <td colspan="3" class="row_content">
                    <textarea id="ImproveMethod" name="ImproveMethod" rows="3" class='form_input' readonly='readonly'><?php echo $new_suggest->suggest_array['ImproveMethod'] ?></textarea>
                </td>
            </tr>
            <tr>
                <td class="row_name">
                    预计效果
                </td>
                <td colspan="3" class="row_content">
                    <textarea id="AnticipateResult" name="AnticipateResult" rows="3" class='form_input' readonly='readonly'><?php echo $new_suggest->suggest_array['AnticipateResult'] ?></textarea>
                </td>
            </tr>
            <tr>
                <td class="row_name">
                    相关文件
                </td>
                <td colspan="3" class="row_content">
                    <?php $new_suggest->need_show_files($db,$sn);?>
                </td>
            </tr>
            <tr>
                <td class="row_name">
                    实际措施
                </td>
                <td colspan="3" class="row_content">
                    <textarea id="PracticalMeasuals" name="PracticalMeasuals" rows="3" class='form_input'></textarea>
                </td>
            </tr>
            <tr>
                <td class="row_name">
                    上传文件
                </td>
                <td>
                    <input id="uploadify" class='form_input'>
                </td>
                <td colspan="2" class="row_content">
                    <div id="queue"></div>
                </td>
            </tr>
        </table>
        <a id="com_btn" onclick="do_complete()">完成合理化建议</a>
    </div>
</div>
</div>
</body>
</html>
